<?php

require '../model/dingdangmodel.php';

class dingdangcontrol{
	private $model;//业务模型
	private $view;

	public function __construct(){
		
		$this->view="../view/main.php?url=dingdang.php";
		$this->model=new dingdangmodel();
	}


	public function load($view=null){
		if(empty($view))
		{				
			header("location:{$this->view}");
		}
		else{
			header("location:{$view}");
		}

	}
	public function doAction($action){
		if($action=='cha'){			
			$this->action_dingdangquery();
		}
		else{
			$this->load();
		}

	}

	//骑手修改
	public function action_dingdangquery(){
		$select=$_POST['select'];
		if (isset($select)){
			$dingdang=new  dingdangmodel();
			$dingdang->dingdangquery($select);
		}
		$this->load("../view/main.php?url=dingdangamer.php&select=".$select);
		
	}
	
	
}
?>